<template>
  <div class="eltag">
    <template v-for="(item, index) in options">
      <template v-if="values.includes(item.dictValue)">
        <el-tag :disable-transitions="true" :index="index">
          {{ item.dictLabel + ' ' }}
        </el-tag>
      </template>
    </template>
  </div>
</template>

<script>
export default {
  name: "typeTag",
  props: {
    options: {
      type: Array,
      default: null,
    },
    value: [Number, String, Array],
  },
  data() {
    return {
    }
  },
  computed: {
    values() {
      if (this.value === null || typeof this.value === 'undefined' || this.value === '') return []
      return Array.isArray(this.value) ? this.value.map(item => '' + item) : String(this.value).split(this.separator)
    },
  },
  filters: {
  }
};
</script>
<style scoped>
.eltag {
  display: inline-block;
  margin-right: 5px;
}
</style>
